/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jlaw.entitats;

import java.io.Serializable;
import javax.persistence.*;


/**
 *
 * @author santi
 */
@Entity
@Table(name = "taulaprova")
@NamedQueries({
    @NamedQuery(name = "Taulaprova.findAll", query = "SELECT t FROM Taulaprova t"),
    @NamedQuery(name = "Taulaprova.findByCodi", query = "SELECT t FROM Taulaprova t WHERE t.codi = :codi")})
public class Taulaprova implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "codi")
    private Short codi;
    @Lob
    @Column(name = "nom")
    private String nom;

    public Taulaprova() {
    }

    public Taulaprova(Short codi) {
        this.codi = codi;
    }

    public Short getCodi() {
        return codi;
    }

    public void setCodi(Short codi) {
        this.codi = codi;
    }

    public String getNom() {
        return nom;
    }

    public void setNom(String nom) {
        this.nom = nom;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (codi != null ? codi.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Taulaprova)) {
            return false;
        }
        Taulaprova other = (Taulaprova) object;
        if ((this.codi == null && other.codi != null) || (this.codi != null && !this.codi.equals(other.codi))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entitats.Taulaprova[codi=" + codi + "]";
    }

}
